package com.ecdc.soexample;

import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
//import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.fragment.app.FragmentActivity;

import com.deep_tools.ecdc.R;
//import com.ecdc.touchelxcdds.R;

//import com.ecdc.touchelx.R;


/**
 * Created by wangfei on 2018/1/23.
 */

public abstract class BaseActivity extends FragmentActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(getResources().getColor(R.color.titlebg));

        }
        setContentView(getLayout());
        setTitle(getResources().getString(R.string.app_name));

    }
    public abstract int getLayout();
//
    public void clickBack(View view){
        finish();
    }

}
